package com.weasel.weixin.commons.service.bean;

import com.weasel.helper.PasswordEncoder;
import org.codehaus.jackson.annotate.JsonProperty;

/**
 * Created by Dylan on 2015/10/15.
 */
public class CustomService {

    @JsonProperty("kf_id")
    private long id;

    @JsonProperty("kf_account")
    private String account;

    @JsonProperty("nickname")
    private String nickName;

    @JsonProperty("password")
    private String password;

    @JsonProperty("kf_headimgurl")
    private String headImgUrl;

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    public void encodePassword(){
        setPassword(PasswordEncoder.encode(password));
    }
}
